<!--上书统计表-->


<?php include('header.php') ?>

<div id="mainbody"  >
<div class="col-lg-9" id="charge">
    <table class="table table-bordered" id="work-table">
      <tr id="table-nav">
        <td> 日期</td>
        <td> 学号</td>
        <td> 姓名</td>
        <td> 电话</td>
        <td> 标签</td>
        <td> 类别</td>
        <td> 册数</td>
        <td>教师验收确认</td>
        <td>备注</td>
        
      </tr>
      <?php 
      $sql="select * from worktable";
	  $result=mysql_query($sql);
      $sql="select timebegin,studentid,lable,family,count,teachid,notice from bookmanage";
      $result=mysql_query($sql);
      while ($row=mysql_fetch_row($result)){ 
      	  $string0 = explode(' ',$row[0]);?>
	      <tr>
	      <td><?php echo $string0[0] ?></td>
	      <td><?php echo $row[1] ?></td>
	      <td><?php 
		      $sql1="select studentname from allstudent where allstudent.studentid='$row[1]'";
		      $result1=mysql_query($sql1);
		      $row1=mysql_fetch_row($result1);
		      echo $row1[0]
	      ?></td>
	      <td><?php 
		      $sql2="select phone from allstudent where allstudent.studentid='$row[1]'";
		      $result2=mysql_query($sql2);
		      $row2=mysql_fetch_row($result2);
		      echo $row2[0]
	      ?></td>
	      <td><?php echo $row[2] ?></td>
	      <td><?php echo $row[3] ?></td>
	      <td><?php echo $row[4] ?></td>
	      <td><?php 
		      $sql3="select teachname from teach where teach.teachid='$row[5]'";
		      $result3=mysql_query($sql3);
		      $row3=mysql_fetch_row($result3);
		      echo $row3[0]
	      ?></td>
	      <td><?php echo $row[6] ?></td>
	      </tr>
     <?php } ?> 
      
      
        
  
   </table>

<?php include('foot.php') ?>